﻿
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Test30.Engine
{
    public class PowerType : ContentBase
    {
        public override string Name { get; }
        public bool IsPrefix { get; }
        public object Appearance { get; }
        public FlagCollection Flags { get; }
        public Roller StrikeBonus { get; set; }
        public Roller DamageBonus { get; set; }
        public Roller ArmorBonus { get; set; }
        public Roller StatBonus { get; set; }
        public Roller SpeedBonus { get; set; }
        public Element? Element { get; set; }
        public ReadOnlyCollection<string> Categories => new ReadOnlyCollection<string>(_categories);

        public PowerType(Content content, string name, bool isPrefix, IEnumerable<string> categories, object appearance) : base(content)
        {
            Name = name;
            IsPrefix = isPrefix;
            _categories.AddRange(categories);
            Appearance = appearance;

            StrikeBonus = Roller.Fixed(0);
            DamageBonus = Roller.Fixed(10);
            ArmorBonus = Roller.Fixed(0);
            StatBonus = Roller.Fixed(0);
            SpeedBonus = Roller.Fixed(0);

            Element = null;

            Flags = new FlagCollection();
        }

        private readonly List<string> _categories = new List<string>();
    }
}
